language: cpp

sudo: required
services:
  - docker

env:
  - IMG=cxx-conan-gcc-5 LIBCXX=libstdc++11 TYPE=Release
  - IMG=cxx-conan-gcc:9 LIBCXX=libstdc++11 TYPE=UBsan
  - IMG=cxx-conan-clang-3.9 LIBCXX=libc++ TYPE=Release
  - IMG=cxx-conan-clang:8 LIBCXX=libc++ TYPE=Release

matrix:
  include:
    -
     if: tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$
     env:
       - IMG=cxx-conan-gcc-8 LIBCXX=libstdc++11 TYPE=Release
       - IMG=cxx-conan-clang-7 LIBCXX=libstdc++11 TYPE=Release

before_install:
  - docker pull sirvestnik/${IMG}

script:
  - docker run -v ${PWD}:/home/builder/src sirvestnik/${IMG} ${LIBCXX} ${TYPE}
